﻿@{
    Layout = null;
    int z = 0;
}
<!DOCTYPE html>
@Html.Partial("LoadPanelPartial")
<html>
<head>
    <title></title>
       @if (false)
       {
        <script src="../../Scripts/jquery-vsdoc.js" type="text/javascript"></script>
        <script src="../../Scripts/ASPxScriptIntelliSense.js" type="text/javascript"></script>
       }
    <link href="@Url.Content("~/Content/Site.css", true)" rel="stylesheet" type="text/css" />

    <link href="@Url.Content("~/Content/jquery-ui.css", true)" rel="stylesheet" type="text/css" />

    <script src="@Url.Content("~/Scripts/jquery.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/jquery-ui.min.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/FloatDiv.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Scripts/regex.js", true)" type="text/javascript"></script>

    <script src="@Url.Content("~/Common/GetRootPath.ashx", true)" type="text/javascript"></script>

    @Html.DevExpress().GetStyleSheets(

        new StyleSheet { ExtensionType = ExtensionType.ListBox, Theme = DevExpressHelper.Theme }
)
    @Html.DevExpress().GetScripts(
        new Script { ExtensionType = ExtensionType.ListBox }
)
<script>
    $(document).ready(function () {
        $("#toolMenu").smartFloat();
        var hdjsAlert = $("#hdjsAlert").val();
        if (hdjsAlert != "") {
            alert(hdjsAlert);
            window.history.go(-1);
        }
        if (hdjsAlert == "操作成功") {
            //var s='@ViewData["index"]'
            window.location.href = rootPath + "/PZZLManager/Index?index=1";
            // window.history.go(-2);
        }
    });

    function MenuTop_emClick(source, e) {
        switch (e.item.name) {
            case "btnSave":
                {
                    Save();
                    break;
                }
        }

    }

    function pd(codeNo, codeName) {
        var bl = true;
        if (null == codeNo || ASPxClientUtils.Trim(codeNo) == "") {
            tbPZZL_DM.SetErrorText("请填写代码");
            tbPZZL_DM.SetIsValid(false);
            bl = false;

        }
        if (null == codeName || ASPxClientUtils.Trim(codeName) == "") {
            tbPZZL_MC.SetErrorText("请填写名称");
            tbPZZL_MC.SetIsValid(false);
            bl = false;
        }
        return bl;

    }
    function Save() {
        var fPZZL_DM = tbPZZL_DM.GetText();
        var fPZZL_MC = tbPZZL_MC.GetText();
        if (pd(fPZZL_DM, fPZZL_MC))
        { form1.submit(); }
    }
</script>

   <style>
    .tableStyle
{
	width: 100%;
	border: solid 1px black;
		padding: 6px 5px;
	border-collapse: collapse;
}
.tableStyle td
{
    margin:0;
    padding:0;
}

.tableStyle .tdClass
{
	padding: 0px;
  padding: 6px 5px;
	border: solid 1px black;
}
.tableStyle th
{
	text-align: right;
	padding: 6px 5px;
	border: solid 1px black;
}
.tableStyle .button
{
	margin: 2px 0px 0px 2px;
	float: left;
}

text{border:1px solid #aecaf0;}

    </style>
</head>
<body>
    @using (Html.BeginForm("Save", "PZZLManager", FormMethod.Post, new { id = "form1" }))
    {
 @Html.DevExpress().Menu(settings =>
{
    settings.Name = "toolBarMenu";
    settings.ItemAutoWidth = false;
    settings.Width = System.Web.UI.WebControls.Unit.Percentage(100);
    settings.Styles.Style.Border.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(0);
    settings.Styles.Style.BorderTop.BorderWidth = System.Web.UI.WebControls.Unit.Pixel(1);
    settings.Items.Add(item =>
    {
        item.Name = "btnSave";
        item.Text = "保存";
        item.Image.Url = Url.Content("~/Content/ControlImages/button_save.png");
    });
    settings.ClientSideEvents.ItemClick = "function(source,e){MenuTop_emClick(source,e)}";
    settings.ItemLinkMode = ItemLinkMode.ContentBounds;
}).GetHtml()
    <div>
    <table style=" margin-left:150px;">
    <tr>
    <td align="center" valign="middle" colspan="2">
    <h1>@ViewData["PZZL_MC"]</h1>
    </td>
    </tr>
       <tr>
            <td style="width: 150">
                凭证种类代码:
            </td>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbPZZL_DM";
                   settings.Width = 150;
                   if ((bool)@ViewData["blcodeNo"])
                   {
                       settings.ReadOnly = false;
                   }
                   else
                   {
                       settings.ReadOnly = true;
                   }
                   settings.Text = Model.PZZL_DM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                凭证种类名称:
            </td>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbPZZL_MC";
                   settings.Width = 150;
                   settings.Text = Model.PZZL_MC;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                原始凭证代码:
            </td>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbYSPZ_DM";
                   settings.Width = 150;
                   settings.Text = Model.YSPZ_DM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                税务文书代码:
            </td>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbSWWS_DM";
                   settings.Width = 150;
                   settings.Text = Model.SWWS_DM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                应征选用标志:
            </td>
            <td>
                @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbYZ_XYBZ";
                   settings.Width = 150;
                   if (Model.YZ_XYBZ == "Y")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                申报选用标志:
            </td>
            <td>
                @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbSB_XYBZ";
                   settings.Width = 150;
                   if (Model.SB_XYBZ == "Y")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                票证选用标志:
            </td>
            <td>
                @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbPZ_XYBZ";
                   settings.Width = 150;
                   if (Model.PZ_XYBZ == "Y")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                退税选用标志:
            </td>
            <td>
                @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbTS_XYBZ";
                   settings.Width = 150;
                   if (Model.TS_XYBZ == "Y")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                减免选用标志:
            </td>
            <td>
                @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbJM_XYBZ";
                   settings.Width = 150;
                   if (Model.JM_XYBZ == "Y")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                缴款书选用标志:
            </td>
            <td>
                @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbJKS_XYBZ";
                   settings.Width = 150;
                   if (Model.JKS_XYBZ == "Y")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                完税证选用标志:
            </td>
            <td>
                @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbWSZ_XYBZ";
                   settings.Width = 150;
                   if (Model.WSZ_XYBZ == "Y")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                凭证大类代码:
            </td>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbPZDL_DM";
                   settings.Width = 150;
                   settings.Text = Model.PZDL_DM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                凭证种类大类代码:
            </td>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbPZZL_DL_DM";
                   settings.Width = 150;
                   settings.Text = Model.PZZL_DL_DM;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                凭证种类顺序:
            </td>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbPZZL_DM_SX";
                   settings.Width = 150;
                   settings.Text = Model.PZZL_DM_SX;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                国税凭证种类名称:
            </td>
            <td>
                @Html.DevExpress().TextBox(settings =>
               {
                   settings.Name = "tbGS_PZZL_MC";
                   settings.Width = 150;
                   settings.Text = Model.GS_PZZL_MC;
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
        <tr>
            <td style="width: 150">
                有效标志:
            </td>
            <td>
                @Html.DevExpress().CheckBox(settings =>
               {
                   settings.Name = "tbYXBZ";
                   settings.Width = 150;
                   if (Model.YXBZ == "Y")
                   {
                       settings.Checked = true;
                   }
                   settings.Properties.ValidationSettings.ErrorDisplayMode = ErrorDisplayMode.ImageWithText;
                   settings.Properties.ValidationSettings.EnableCustomValidation = true;
               }).GetHtml()
            </td>
        </tr>
    </table>
              @Html.Hidden("hdjsAlert", (ViewData["jsAlert"]))
                         @Html.Hidden("hidFAllowanceFileID", (ViewData["FAllowanceFileID"]))
                         @Html.Hidden("isAdd", (ViewData["blcodeNo"]))
    </div>
    }
</body>
</html>
